<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*"%>
<%@ page import="lesfiersarepasser.assoc.bdd.*"%>
<%@ page import="lesfiersarepasser.assoc.bean.Articles"%>
<%!ArrayList<Articles> lesArticles;%>
<%
	lesArticles = DerbyConnection.getArticles();
%>

<h1>Catalogue des articles</h1>

<table>

	<%
		for (Articles a : lesArticles) {
	%>
	<tr>
	
		<td colspan="5">
			<form class="form-inline" action="<%=request.getContextPath()%>/order?article=<%=a.getCode()%>" method="post">
				<label name="articleCode"><%=a.getCode()%></label>
				<label name="articleName"><%=a.getNom()%></label>
				<label name="articlePrice"><%=a.getPrix()%></label>
				<label name="articleStock"><%=a.getStock()%></label>
				<input type="text" pattern="[0-9]" name="articleQuantity" placeholder="quantite"/>
				<input type="submit" name="orderThis" value="Commander" />
			</form>
		</td>
	</tr>
	<% } %>
</table>
